from threading import Thread
import time

g_num = [1, 2, 3]


def work1(nums):
    nums.append(44)
    print("----in work1---", nums)


def work2(nums):
    print("----in work2---", nums)


t1 = Thread(target=work1, args=(g_num,))
t1.start()

# 延时一会，保证t1线程中的事情做完
time.sleep(1)

t2 = Thread(target=work2, args=(g_num,))
t2.start()
